/*
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * Portions created by the Initial Developer are
 * Copyright (C) 2012 the Initial Developer.
 * All Rights Reserved.
 *
 * The Original Code is this.
 *
 * The Initial Developer of the Original Code is the author below.
 */ 
 /**
 * @file .h
 * @brief auto generated.
 * @author K.Ozaki
 * @date 2011/03/11
 */


/*
 * TimerConfig.h
 *
 *  @date: 2011/10/27
 *  @author: ozaki
 */

#ifndef TIMERCONFIG_H_
#define TIMERCONFIG_H_

#include "semi/conf/Configurator.h"
#include "semi/util/DateUtil.h"

namespace semi {
namespace conf {

class TimerConfig {
public:
    TimerConfig(std::string taskId);
    TimerConfig(Configurator::TaskConfig tconf);
    virtual ~TimerConfig();

    int getDelay();
    bool isValid();

    std::string taskId;

    short span;

private:

    void loadConfig();

    void setDate(short y, short m, short d);
    void setTime(short hour, short min, short sec);
    //    void setMin(short min, short sec);
    //    void setSec(short sec);

    short y, m, d;
    short h, min, s;
};

}
}
#endif /* TIMERCONFIG_H_ */
